1. Field of the Invention
The present invention relates to a network system in which IP (Internet Protocol) addresses are managed by a DHCP (Dynamic Host Configuration Protocol) server and a DHCP server selection method, and more particularly, to a network system and a DHCP server selection method, which facilitates management of IP addresses by having each client select its own DHCP server when two or more DHCP servers exist.
2. Description of the Related Art
A network system has been known,in which a DHCP server is provided on the network, and the right to use an IP address is dynamically acquired through the DHCP server when a client network node is started up.
This DHCP server is a server which dynamically assigns IP addresses to each client in accordance with specifications set forth in RFC (Request For Comment) 1531, a standard recommendation of the IAB (Internet Architecture Board).
With such a network system, it is not necessary to establish IP address for each network node, but IP address is assigned only to a node that is in operation. This is advantageous in that IP addresses can be used efficiently, and network management can be simplified.
However, RFC 1531 does not stipulate which DHCP server is selected by each client in a network to which a plurality of DHCP servers are connected.
Consequently, in a network to which a plurality of DHCP servers are connected, there is no way of knowing from which DHCP server a client will acquire an IP address until the client actually starts up a node.
As a result, when each DHCP server has a different manager, the management of IP addresses is complicated, and the advantage of DHCP, that is, facilitating the management of IP addresses, cannot be utilized to its fullest.
For example, when respective LANs (Local Area Network) installed on each floor of an office building are interconnected via IP routers, and a network manager and DHCP server are provided for each LAN, if each DHCP server assigns IP addresses irrespective of the floor, the management of IP addresses will become complex.
For this reason, when two or more DHCP servers are connected to a network, how to specify the DHCP server from which each client acquires an IP address, and how to facilitate IP address management, are important subjects to study.
Furthermore, it is not appropriate to assign management capabilities for clients to the DHCP server side since this requires that registration and updating work be performed for all clients thereby to increase the burden on each network manager.
Accordingly, an object of the present invention is to provide a network system and DHCP server selection method, which solves for the above-mentioned problems, and which makes management of IP addresses easy by having each client select its own prescribed DHCP server when two or more DHCP servers exist.
To realize the above-mentioned object, the first aspect of the present invention is to provide a network system comprising a network; a plurality of clients which are connected to the network and request respective IP addresses; and a plurality of DHCP servers which are connected to the network and dynamically assign respective IP addresses to each of the clients, wherein each of the clients comprises memory means for storing a reference address; and selection means for selecting a DHCP server from the plurality of DHCP servers based on IP addresses acquired from each of the plurality of DHCP servers and on the reference address stored in the memory means.
The network system so configured as above enables to achieve the effects as follows.
1) Even when a plurality of DHCP servers are installed in the network, each client can always use the IP address assigned by the same DHCP server.
2) IP addresses in each DHCP server can be readily managed.
3) Client can take the initiative in selecting a DHCP server without having to change address data in the DHCP server.
Further, in the network system according to the first aspect of the present invention, the second aspect of the present invention is to provide the network system in which the selection means finds differences between the reference address stored in the memory means and each of the IP addresses, and selects a DHCP server which assigns an IP address which has smallest difference from the reference address.
With this configuration of the selection means, a desired DHCP server can be selected by a simple arithmetic operation.
Further, in the network system according to the second aspect of the present invention, the third aspect of the present invention is to provide the network system in which the memory means stores as a reference address central address of an address space allocated to the DHCP server selected by the selection means.
With this configuration of the memory means, a desired DHCP server can be accurately selected.
Further, in the network system according to the second aspect of the present invention, the forth aspect of the present invention is to provide the network system in which a prescribed gap is provided between address spaces allocated to each of the plurality of DHCP servers, and the memory means stores a previously assigned IP address as a reference address.
With this configuration, a desired DHCP server can be accurately selected even when an address area which consists of successive addresses cannot be allocated to DHCP server.
Further, in the network system according to the second through fourth aspects of the present invention, the fifth aspect of the present invention is to provide the network system in which the selection means selects a DHCP server which assigns an IP address having a bit string whose distance from a bit string forming the reference address is shortest among the plurality of the IP addresses.
With this configuration of the selection means, a desired DHCP server can be selected using a simple arithmetic operation.
Further, in the network system according to the second through fourth aspects of the present invention, the sixth aspect of the present invention is to provide the network system in which the selection means selects a DHCP server which assigns an IP address having a bit string located at a prescribed location whose distance from a bit string located at a prescribed location of the reference address is the shortest among the plurality of the IP addresses.
With this configuration of the selection means, a desired DHCP server can be selected using a simple arithmetic operation.
Further, the seventh aspect of the present invention is to provide a DHCP server selection method in a network system comprising a network to which a plurality of clients which request respective IP addresses and a plurality of DHCP servers which dynamically assign respective IP addresses to each of the clients, are connected, wherein each of the clients performs the steps of acquiring respective IP addresses from the plurality of DHCP servers; finding difference between each of the acquired IP addresses and a reference address; and selecting a DHCP server which assigns an IP address whose distance from the reference address is smallest.
The network system so configured as above enables to achieve the effects as follows.
1) Even when a plurality of DHCP servers are installed in the network, each client can always use the IP address assigned by the same DHCP server.
2) IP addresses in each DHCP server can be readily managed.
3) Client can take the initiative in selecting a DHCP server without having to change address data in the DHCP server.
Further, the eighth aspect of the present invention is to provide a DHCP server selection method in a network system comprising a network to which a plurality of clients which request respective IP addresses and a plurality of DHCP servers which dynamically assign respective IP addresses to each of the clients, are connected, wherein each of the clients performs the steps of broadcasting a Discover packet to each of the plurality of DHCP servers; extracting respective IP addresses from Offer packets returned in response to the broadcasted Discover packet; finding respective differences between each of the extracted IP addresses and a reference address; selecting a DHCP server which assigns an IP address whose obtained difference from the reference address is smallest; requesting use of the IP address by transmitting a Request packet to the selected DHCP server; and receiving an Ack packet returned from the selected DHCP server.
With this configuration of the network system, a desired DHCP server can be selected in accordance with the specifications set forth in RFC 1531.